{foreach ['danger', 'warning', 'success', 'info'] as $key=>$msg }
    {if session($msg) }
      <div class="flash-message">
        <p class="alert alert-{$msg}">
          {$msg|session=###}
        </p>
      </div>
    {/if}
{/foreach}